﻿using Dapper.Contrib.Extensions;
using IntelligentGateway.Model.Attribute;
using IntelligentGateway.Model.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IntelligentGateway.Model
{
    public class BaseDeviceInfo
    {
        [Key]
        public int ID { get; set; }
        public ushort NO { get; set; }
        public string DeviceName { get; set; }
        public string DeviceIP { get; set; }
        //public string PanelIP { get;set; }
        public string DFloor { get; set; }
        public string PFloor { get; set; }
        public string AFloor { get; set; }
        public string SignType { get; set; }

    }
    [Serializable]
    [Table("MasterDeviceInfo")]
    public class MasterDeviceInfo : BaseDeviceInfo, IBase
    {
        [Write(false)]
        [Ignore]
        public int? TotalRecords { get; set ; }
    }
    [Serializable]
    [Table("SubDeviceInfo")]
    public class SubDeviceInfo : BaseDeviceInfo,IBase
    {
        public int PID { get; set; }
        [Write(false)]
        [Ignore]
        public int? TotalRecords { get; set; }
    }
    public class DeviceInfo
    {
        public MasterDeviceInfo MasterDeviceInfo { get; set; }
        public List<SubDeviceInfo> LstSubDeviceInfo { get; set; }
    }
}
